package com.client.service;

import com.client.dto.GoodsAndLanguageDto;
import com.client.pojo.FlowerOrder;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 晚云
 * @since 2023-09-12
 */
public interface FlowerOrderService extends IService<FlowerOrder> {

    /**
     * 插入订单
     * @param flowerOrders
     * @return
     */
    boolean insertOrder(List<FlowerOrder> flowerOrders);

    /**
     * 查询用户的订单
     * @param userId
     * @return
     */
    List<FlowerOrder> order_select_List(String userId);

    /**
     * 根据用户id和商品id查询订单
     * @param userId
     * @param goodsId
     * @return
     */
    List<FlowerOrder> selectAndCount(String userId, String goodsId);

    /**
     * 直接买购时添加到订单表中
     * @param dto
     * @param orderId
     * @return
     */
    boolean saveOrder(GoodsAndLanguageDto dto, String orderId);
}

